package com.fjec.paid.schedule.handler;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fjec.paid.entity.BizDistribution;
import com.fjec.paid.service.IBizDistributionService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
public class QueryDivideHandler {
    @Resource
    private IBizDistributionService bizDistributionService;

    public void handle(int limit, int minutes) {
        List<BizDistribution> distributions = bizDistributionService.getDividing(limit);
        distributions.forEach(dist -> {
            bizDistributionService.doQuery(dist);
        });
    }
}
